package com.whsxt.feign;

import com.whsxt.domain.Sku;
import com.whsxt.feign.hystrix.OrderProductFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-03-26 11:11
 * @Description:
 */
@FeignClient(value = "product-service",fallback = OrderProductFeignHystrix.class)
public interface OrderProductFeign {


    @PostMapping("/prod/prod/getSkuByIds")
    List<Sku> getSkuByIds(@RequestBody List<Long> skuIds);


    @PostMapping("/prod/prod/changeStock")
    void changeStock(@RequestBody Map<String, Map<Long, Integer>> stockMap);

}
